]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Enforce non-legacy style for new code
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 9 Nov 2020 19:24:34 +0000 (20:24 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 13 Nov 2020 21:40:45 +0000 (22:40 +0100)
We have been transitioning to the new coding style for a while now,
and there has been reasonable progress. So hopefully it is not too
intrusive at this point to enforce non-legacy style for all lines
that are changed in a merge request. If it turns out to be still too
annoying, we can always reconsider and turn off the additional job.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1497

.gitlab-ci.yml

index 195bb8a6d90d8227a0abcce2ab1dcc03dc3cccf2..581ef2ba088d9e885ce94f7d3fd6aaf0359222d6 100644 (file)
@@ -10,6 +10,7 @@ variables:
     BUNDLE: "extensions-git.flatpak"
     JS_LOG: "js-report.txt"
     LINT_LOG: "eslint-report.xml"
+    LINT_MR_LOG: "eslint-mr-report.xml"
 
 .only_default: &only_default
     only:
@@ -51,6 +52,21 @@ eslint:
             junit: ${LINT_LOG}
         when: always
 
+eslint_mr:
+    image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v2
+    stage: review
+    script:
+        - export NODE_PATH=$(npm root -g)
+        - ./.gitlab-ci/run-eslint --output-file ${LINT_MR_LOG} --format junit
+            --remote ${CI_MERGE_REQUEST_PROJECT_URL}.git
+            --branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
+    only:
+        - merge_requests
+    artifacts:
+        reports:
+            junit: ${LINT_MR_LOG}
+        when: always
+
 potfile_check:
     image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v2
     stage: review